package pl.smath.renderer.model;

import pl.smath.renderer.renderer.TermRendererException;
import pl.smath.renderer.utils.InteractionSocket;
import gwt.g2d.client.graphics.Surface;

public class GapView extends View {

	private int gapWidth;
	private int gapHeight;
	
	public GapView(int w, int h) {
		super("");
		gapWidth = w;
		gapHeight = h;
		setWidth((double)gapWidth);
		setHeight((double)gapHeight);
	}

	@Override
	public void render(Surface canvas, InteractionSocket socket) throws TermRendererException{
		if (socket != null){
			socket.registerElement(getCursor().getX(), getCursor().getY()-gapHeight+(gapHeight-(getFontHeight()-7)) / 2 );
		}
	}
	
	@Override
	public void update() {
		//setWidth(20d);
		//setHeight(19d);
	}

}
